student performance .ipynb
No Headings
The table of contents shows headings in notebooks and supported files.
- File
- Edit
- View
- Run
- Kernel
- Settings
- Help
Kernel status: Idle
<class 'pandas.core.frame.DataFrame'> RangeIndex: 1000 entries, 0 to 999 Data columns (total 8 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 gender 1000 non-null object 1 race/ethnicity 1000 non-null object 2 parental level of education 1000 non-null object 3 lunch 1000 non-null object 4 test preparation course 1000 non-null object 5 math score 1000 non-null int64 6 reading score 1000 non-null int64 7 writing score 1000 non-null int64 dtypes: int64(3), object(5) memory usage: 62.6+ KB
[26]:
df.head(20)
[26]:
| gender | race/ethnicity | parental level of education | lunch | test preparation course | math score | reading score | writing score | |
|---|---|---|---|---|---|---|---|---|
| 0 | male | group A | high school | standard | completed | 67 | 67 | 63 |
| 1 | female | group D | some high school | free/reduced | none | 40 | 59 | 55 |
| 2 | male | group E | some college | free/reduced | none | 59 | 60 | 50 |
| 3 | male | group B | high school | standard | none | 77 | 78 | 68 |
| 4 | male | group E | associate's degree | standard | completed | 78 | 73 | 68 |
| 5 | female | group D | high school | standard | none | 63 | 77 | 76 |
| 6 | female | group A | bachelor's degree | standard | none | 62 | 59 | 63 |
| 7 | male | group E | some college | standard | completed | 93 | 88 | 84 |
| 8 | male | group D | high school | standard | none | 63 | 56 | 65 |
| 9 | male | group C | some college | free/reduced | none | 47 | 42 | 45 |
| 10 | male | group E | some college | standard | completed | 99 | 83 | 85 |
| 11 | female | group D | high school | standard | completed | 80 | 87 | 90 |
| 12 | male | group D | associate's degree | standard | completed | 77 | 87 | 85 |
| 13 | male | group C | high school | standard | completed | 74 | 74 | 73 |
| 14 | male | group E | some high school | standard | completed | 81 | 87 | 85 |
| 15 | male | group E | associate's degree | free/reduced | none | 69 | 61 | 57 |
| 16 | male | group B | high school | standard | none | 58 | 47 | 42 |
| 17 | female | group C | associate's degree | standard | completed | 54 | 62 | 65 |
| 18 | female | group C | associate's degree | free/reduced | none | 23 | 44 | 44 |
| 19 | male | group C | some college | free/reduced | none | 39 | 32 | 31 |
[5]:
(1000, 8)
[6]:
| math score | reading score | writing score | |
|---|---|---|---|
| count | 1000.000000 | 1000.000000 | 1000.000000 |
| mean | 66.396000 | 69.002000 | 67.738000 |
| std | 15.402871 | 14.737272 | 15.600985 |
| min | 13.000000 | 27.000000 | 23.000000 |
| 25% | 56.000000 | 60.000000 | 58.000000 |
| 50% | 66.500000 | 70.000000 | 68.000000 |
| 75% | 77.000000 | 79.000000 | 79.000000 |
| max | 100.000000 | 100.000000 | 100.000000 |
[7]:
df.isnull().sum()
[7]:
gender 0 race/ethnicity 0 parental level of education 0 lunch 0 test preparation course 0 math score 0 reading score 0 writing score 0 dtype: int64
[8]:
import matplotlib.pyplot as plt
plt.figure(figsize=(10,5))
df.boxplot(column=['math score','reading score','writing score'])
plt.title('score outliers')
plt.show()
[10]:
import seaborn as sns
import matplotlib.pyplot as plt
plt.figure(figsize=(12,4))
plt.subplot(1,3,1)
sns.histplot(df['math score'],kde=True)
plt.title('math score distribution')
plt.subplot(1,3,2)
sns.histplot(df['reading score'],kde=True)
plt.title('reading score distribution')
plt.subplot(1,3,3)
sns.histplot(df['writing score'],kde=True)
plt.title('writing score distrinution')
plt.tight_layout()
plt.show()
[12]:
sns.barplot(x='gender',y='math score',data=df)
plt.title('math score vs gender')
plt.show()
[30]:
plt.figure(figsize=(10,5))
sns.barplot(x='lunch',y='writing score',data=df)
plt.xticks(rotation=45)
plt.title('writing score vs lunch')
plt.show()
[38]:
plt.figure(figsize=(10,5))
sns.barplot(x='test preparation course',y='reading score',data=df)
plt.xticks(rotation=45)
plt.title('reading score vs test preparation course')
plt.show()
<Figure size 1000x500 with 1 Axes>
Common Tools
No metadata.
Advanced Tools
No metadata.
Anaconda Assistant
AI-powered coding, insights and debugging in your notebooks.
To enable the following extensions, create an account or sign in.
- Anaconda Assistant4.1.0
- Coming soon!
- Data Catalogs
- Panel Deployments
- Sharing
Already have an account? Sign In
For more information, read our Anaconda Assistant documentation.
![Python [conda env:base] *](./student performance eda_files/logo-64x64.png)